<script setup>
import { ref } from "vue";
import { useAuthStore } from "@/store";
const authStore = useAuthStore();
const { authLogOut } = authStore;
import { useRouter } from "vue-router";
const router = useRouter();
import { useI18n } from "vue-i18n";
const { t } = useI18n();

const handleLogOut = async () => {
  console.log("退出登陆");
  const res = await authLogOut();
  router.replace({
    path: "/login",
  });
};
</script>

<template>
  <div class="h-full flex flex-col justify-center items-center">
    <div class="mb-[100px] text-[20px] font-bold">{{ t("test.homePage") }}</div>
    <button
      @click="handleLogOut"
      class="px-[20px] py-[10px] bg-[#333] text-white rounded-[5px]"
    >
      {{ t("test.logout") }}
    </button>
  </div>
</template>

<style></style>
